
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>springboot-starter模块 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../integration.html" />
    
    
    <link rel="prev" href="rest.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    概要
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="../architecture.html">
            
                <a href="../architecture.html">
            
                    
                    总体架构
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../quick-start.html">
            
                <a href="../quick-start.html">
            
                    
                    快速开始
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../quickstart/confcenter.html">
            
                <a href="../quickstart/confcenter.html">
            
                    
                    配置中心
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../quickstart/oneplatform.html">
            
                <a href="../quickstart/oneplatform.html">
            
                    
                    oneplatform企业级开发平台
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../quickstart/passport.html">
            
                <a href="../quickstart/passport.html">
            
                    
                    统一认证平台
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../jeesuite-lib.html">
            
                <a href="../jeesuite-lib.html">
            
                    
                    jeesuite-libs使用文档
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="common.html">
            
                <a href="common.html">
            
                    
                    common模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="common2.html">
            
                <a href="common2.html">
            
                    
                    common2模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="spring.html">
            
                <a href="spring.html">
            
                    
                    Spring模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="mybatis.html">
            
                <a href="mybatis.html">
            
                    
                    mybatis模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="cache.html">
            
                <a href="cache.html">
            
                    
                    cache模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="kafka.html">
            
                <a href="kafka.html">
            
                    
                    kafka模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="scheduler.html">
            
                <a href="scheduler.html">
            
                    
                    scheduler模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="filesystem.html">
            
                <a href="filesystem.html">
            
                    
                    filesystem模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="rest.html">
            
                <a href="rest.html">
            
                    
                    restAPI模块
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.10" data-path="springboot-starter.html">
            
                <a href="springboot-starter.html">
            
                    
                    springboot-starter模块
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../integration.html">
            
                <a href="../integration.html">
            
                    
                    系统集成
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../integration/confcenter.html">
            
                <a href="../integration/confcenter.html">
            
                    
                    集成配置中心
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../integration/passport.html">
            
                <a href="../integration/passport.html">
            
                    
                    集成认证中心
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../base-env-install.html">
            
                <a href="../base-env-install.html">
            
                    
                    附：基础环境搭建
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >springboot-starter模块</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p>1#### &#x6DFB;&#x52A0;&#x4F9D;&#x8D56;</p>
<pre><code>&lt;dependency&gt;
    &lt;groupId&gt;com.jeesuite&lt;/groupId&gt;
    &lt;artifactId&gt;jeesuite-springboot-starter&lt;/artifactId&gt;
    &lt;version&gt;1.1.5&lt;/version&gt;
&lt;/dependency&gt;
</code></pre><h4 id="&#x6CE8;&#x89E3;&#x5B9A;&#x4E49;">&#x6CE8;&#x89E3;&#x5B9A;&#x4E49;</h4>
<ul>
<li>@EnableJeesuiteCache &#xFF1A;&#x96C6;&#x6210;cache&#x6A21;&#x5757;</li>
<li>@EnableJeesuiteMybatis &#xFF1A; &#x96C6;&#x6210;mybatis&#x6A21;&#x5757;</li>
<li>@EnableJeesuiteSchedule &#xFF1A;&#x96C6;&#x6210;schedule&#x6A21;&#x5757;</li>
<li>@EnableJeesuiteKafkaConsumer &#xFF1A; &#x96C6;&#x6210;kafka consumer</li>
<li>@EnableJeesuiteKafkaProducer &#xFF1A; &#x96C6;&#x6210;kafka producer</li>
</ul>
<h4 id="&#x914D;&#x7F6E;">&#x914D;&#x7F6E;</h4>
<p>&#x6CE8;&#xFF1A;=&#x540E;&#x9762;&#x7684;&#x4E3A;&#x9ED8;&#x8BA4;&#x503C;&#xFF0C;&#xFF08;&#xFF09;&#x5305;&#x542B;&#x7684;&#x4E3A;&#x53EF;&#x9009;&#x503C;&#x3002;&#x542B;&#x4E49;&#x8BF7;&#x53C2;&#x8003;&#x5177;&#x4F53;&#x6A21;&#x5757;&#x3002;</p>
<pre><code>--cache
jeesuite.cache.mode=standalone (standalone:&#x5355;&#x673A;&#x6A21;&#x5F0F;&#xFF0C;sentinel&#xFF1A;&#x54E8;&#x5175;&#x6A21;&#x5F0F;(&#x4E3B;&#x4ECE;),cluster&#xFF1A;&#x96C6;&#x7FA4;&#x6A21;&#x5F0F;&#xFF0C;shard&#xFF1A;&#x5206;&#x7247;&#x6A21;&#x5F0F;)
jeesuite.cache.servers=
jeesuite.cache.password=
jeesuite.cache.database=0
jeesuite.cache.maxPoolSize=
jeesuite.cache.maxPoolIdle=
jeesuite.cache.minPoolIdle=
jeesuite.cache.maxPoolWaitMillis=
jeesuite.cache.level1.distributedMode=true
jeesuite.cache.level1.bcastServer=
jeesuite.cache.level1.password=
jeesuite.cache.level1.bcastScope=
jeesuite.cache.level1.cacheProvider=guavacache  (ehcache , guavacache)
jeesuite.cache.level1.maxCacheSize=5000
jeesuite.cache.level1.timeToLiveSeconds=300
jeesuite.cache.level1.cacheNames=

--mybatis
jeesuite.mybatis.dbType=MySQL
jeesuite.mybatis.crudDriver=mapper3
jeesuite.mybatis.cacheEnabled=false
jeesuite.mybatis.rwRouteEnabled=false
jeesuite.mybatis.dbShardEnabled=false
jeesuite.mybatis.paginationEnabled=true

--schedule
jeesuite.task.registryType=zookeeper
jeesuite.task.registryServers=
jeesuite.task.groupName=
#&#x626B;&#x63CF;@ScheduleConf&#x6CE8;&#x89E3;&#x7684;&#x5305;
jeesuite.task.scanPackages=
jeesuite.task.threadPoolSize=

--kafka
kafka.bootstrap.servers=
kafka.zkServers=
jeesuite.kafka.producer.defaultAsynSend=
jeesuite.kafka.producer.producerGroup=
jeesuite.kafka.producer.monitorZkServers=
jeesuite.kafka.producer.delayRetries=0
#&#x5176;&#x4ED6;kafka&#x539F;&#x751F;&#x914D;&#x7F6E;(kafka.producer.xxx)
kafka.producer.acks=1
kafka.producer.retries=1

jeesuite.kafka.consumer.independent
jeesuite.kafka.consumer.useNewAPI=false
jeesuite.kafka.consumer.processThreads=100
#&#x626B;&#x63CF;@ConsumerHandler&#x6CE8;&#x89E3;&#x7684;&#x5305;
jeesuite.kafka.consumer.scanPackages=
#&#x5176;&#x4ED6;kafka&#x539F;&#x751F;&#x914D;&#x7F6E;(kafka.consumer.xxx)
kafka.consumer.group.id=
kafka.consumer.enable.auto.commit=

#&#x5982;&#x679C;&#x4F7F;&#x7528;NewAPI&#xFF0C;&#x914D;&#x7F6E;poll&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#x9ED8;&#x8BA4;1000&#x6BEB;&#x79D2;
kafka.consumer.poll.timeout.ms=1000
</code></pre><h4 id="&#x4F7F;&#x7528;">&#x4F7F;&#x7528;</h4>
<p>&#x9664;&#x4E86;&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;&#x6CE8;&#x518C;&#x548C;kafka&#x6D88;&#x8D39;&#x8005;&#x6CE8;&#x518C;&#x4E0E;&#x539F;spring&#x65B9;&#x5F0F;&#x4E0D;&#x4E00;&#x81F4;&#x5916;&#xFF0C;&#x5176;&#x4ED6;&#x90FD;&#x4E00;&#x6837;&#x3002;</p>
<h5 id="&#x6CE8;&#x518C;&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;">&#x6CE8;&#x518C;&#x5B9A;&#x65F6;&#x4EFB;&#x52A1;</h5>
<pre><code>@Service
@ScheduleConf(cronExpr=&quot;0 18 0 ? * MON&quot;,jobName=&quot;pushWeixinMsgTask&quot;)
public class PushWeixinMsgTask extends AbstractJob{

    public void doJob(JobContext context) throws Exception {
        //do
    }

    @Override
    public boolean parallelEnabled() {
        return false;
    }

}
</code></pre><h5 id="&#x6CE8;&#x518C;kafka-consumer">&#x6CE8;&#x518C;kafka consumer</h5>
<pre><code>@Service
@ConsumerHandler(topic = &quot;demo-topic&quot;)
public class DemoMessageHandler implements MessageHandler {

    @Override
    public void p1Process(DefaultMessage message) {}

    @Override
    public void p2Process(DefaultMessage message) {
        Serializable body = message.getBody();
        System.out.println(&quot;DemoMessageHandler process message:&quot; + body);
        try {Thread.sleep(100);} catch (Exception e) {}
    }


    @Override
    public boolean onProcessError(DefaultMessage message) {
        System.out.println(&quot;ignore error message : &quot;+message);
        return true;
    }

}
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="rest.html" class="navigation navigation-prev " aria-label="Previous page: restAPI模块">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../integration.html" class="navigation navigation-next " aria-label="Next page: 系统集成">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"springboot-starter模块","level":"1.3.10","depth":2,"next":{"title":"系统集成","level":"1.4","depth":1,"path":"integration.md","ref":"integration.md","articles":[{"title":"集成配置中心","level":"1.4.1","depth":2,"path":"integration/confcenter.md","ref":"integration/confcenter.md","articles":[]},{"title":"集成认证中心","level":"1.4.2","depth":2,"path":"integration/passport.md","ref":"integration/passport.md","articles":[]}]},"previous":{"title":"restAPI模块","level":"1.3.9","depth":2,"path":"jeesuite-libs/rest.md","ref":"jeesuite-libs/rest.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"jeesuite-libs/springboot-starter.md","mtime":"2017-10-30T02:16:34.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-05-04T10:30:11.187Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

